import Data.List	

euler_038 :: Integer
euler_038 = maximum $ map read $ sort (filter isPanDigital ( concat(map (\y ->( map (\x->(concat(map (show.(*y)) [1..x]))) [2..(div 10) (ceiling ( (log 123)/(log 10) ))] )) [1..99999])))
	where	
		isPanDigital (text)
			| length text /= 9 			= False
			| length (nub text) /= 9 	= False
			| any (=='0') text			= False
			| otherwise					= True